home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 July / 07_02.iso / software / xq-xsetup / files / setup.exe / {app} / plugins / XQ WinNT AutoLogin Enable.xpl < prev    next >
Text File  |  2002-04-13  |  4KB  |  95 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="3"
  4. "UIPATH"="Network\Auto Login\Windows NT/2K/XP"
  5. "NAME"="General"
  6. "VERSION"="1.86"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="010101"
  9. "TEXT 1"="Enable auto login"
  10. "TEXT 2"="Enable auto login count"
  11. "TEXT 3"="Enable Shift override"
  12. "DESCRIPTION 1"="Auto login can be used to bypass the "Press Ctrl+Alt+Del to login" nagging screen at bootup."
  13. "DESCRIPTION 2"="Enable auto login ONLY IF you have already set the correct values using the "Settings" plug-in below."
  14. "DESCRIPTION 3"="You MUST enable "Auto login count" to take advantage of the auto login feature more than ONCE. Maximum allowed value [4294967295] is used here. This represents how many times you can auto login."
  15. "DESCRIPTION 4"="To temporarily stop auto login (ONLY IF enabled) in order to logon as a different user, press and hold the SHIFT key before the "Login" screen appears. This will allow you to logon by typing any (other) valid user name and password."
  16. "DESCRIPTION 5"="CAUTION: It is advised to disable "Shift override" for security reasons, e.g. on a POS (Point of Sales) terminal."
  17. "DESCRIPTION 6"="WARNING: Your password and user name information are kept in the system Registry in non-encrypted form, and could be revealed if anyone were to logon locally onto your machine, and use the Registry Editor. We suggest only using this if you have non-critical data on your computer and/or if your machine is located in a secure physical environment."
  18. "DESCRIPTION 7"="NOTE: You can also bypass the login prompt by using the Windows 2000/XP/.Net "Accounts and Passwords" applet inside Control Panel."
  19. "DESCRIPTION 8"="See this web page for more details: http://members.aol.com/axcel216/2k1.htm#BAIW"
  20. "AUTHOR"="Xteq Systems"
  21. "CONTACTURL"="http://www.xteq.com/"
  22. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  23. "COMMENT 1"="Modified by AXCEL216 [axcel216@aol.com] on 4-11-2002."
  24.  
  25. sRP="HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\"
  26. Sub Plugin_Initialize
  27.  if RegPathExists(sRP) then
  28.   i=RegReadValue(sRP&"AutoAdminLogon")
  29.   if i=1 then 
  30.    SetUIElement 1,true
  31.   end if
  32.  
  33.   i=RegReadValue(sRP&"AutoLogonCount")
  34.   if i=4294967295 then
  35.    SetUIElement 2,true
  36.   end if
  37.  
  38.   i=RegReadValue(sRP&"IgnoreShiftOverride")
  39.   if IsEmpty(i) or i=0 then
  40.    SetUIElement 3,true
  41.   end if
  42.  
  43.  else
  44.   Disable
  45.  end if
  46. End Sub
  47.  
  48. Sub Plugin_CheckData(ElementIndex)
  49. End Sub
  50.  
  51. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  52.  b1=GetUIElement(1)
  53.  b2=GetUIElement(2)
  54.  b3=GetUIElement(3)
  55.  
  56.  if b1=true and b3=true then
  57.   Call MsgWarning("NOTE: To log on to the system as a different user, hold down the Shift key after logging off to reenable the normal Logon dialog box prompt.")
  58.  end if
  59.  
  60.  if b1=true and b3=false then 
  61.   Call MsgWarning("WARNING: Shift override is now DISABLED. To reenable the normal login prompt you MUST make sure you are able to access X-Setup in the future using the SAME configured user name in order to disable auto login again!")
  62.  end if
  63.  
  64.  if b1=true then
  65.   Call RegWriteValue(sRP&"AutoAdminLogon","1",1)
  66.  else
  67.   s=RegReadValue(sRP&"AutoAdminLogon")
  68.  
  69.   if IsNull(s)=false and Len(s)>0 then
  70.   Call RegDeleteValue(sRP&"AutoAdminLogon")
  71.   end if
  72.  end if
  73.  
  74.  if b2=true then
  75.     Call RegWriteValue(sRP&"AutoLogonCount",4294967295,2)
  76.  else
  77.     s=RegReadValue(sRP&"AutoLogonCount")
  78.  
  79.   if IsNull(s)=false and Len(s)>0 then
  80.   Call RegDeleteValue(sRP&"AutoLogonCount")
  81.   end if
  82.  end if
  83.  
  84.  if b3=true then
  85.   if RegValueExists(sRP&"IgnoreShiftOverride") then RegDeleteValue(sRP&"IgnoreShiftOverride")
  86.  else
  87.   Call RegWriteValue(sRP&"IgnoreShiftOverride","1",1)
  88.  end if
  89.  
  90.  Call Logoff
  91. End Sub
  92.  
  93.  
  94. Sub Plugin_Terminate
  95. End Sub